package com.stellar.web.core.enums;


import lombok.Getter;

/**
 * 推荐状态枚举
 *
 * @Author Jqcc
 * @Version 1.0
 * @Data 2024/3/4
 */

@Getter
public enum IsRecommendFlagEnum {

    DEFAULT("default", "默认"),

    RECOMMEND("recommend", "推荐");

    private String val;

    private String desc;

    IsRecommendFlagEnum(String code, String desc) {
        this.val = code;
        this.desc = desc;
    }

    public static IsRecommendFlagEnum getByCode(int val) {
        for (IsRecommendFlagEnum isDeletedFlagEnum : IsRecommendFlagEnum.values()) {
            if (isDeletedFlagEnum.val.equals(val)) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
